package pages;

import org.openqa.selenium.By;
import utils.Log4Test;
import utils.WebDriverWrapper;

/**
 * Created by Vadim on 6/10/14.
 */
public class VideoPage extends BasePage{
    private static final String URL_VIDEO = "http://rozetka.com.ua/tv-photo-video/c80258/";
    private static final By pageVideo = By.xpath("//*[@id='tv-photo-video']/div/a");

    public VideoPage(WebDriverWrapper driver) {
        super(driver, URL_VIDEO);
    }

    public void open() {
        driver.findElement(pageVideo).click();
        if (driver.getCurrentUrl().equals(URL_VIDEO)) {
            Log4Test.info("Page tv and video is opened");
        } else {
            Log4Test.error("Page tv and video isn't opened");
        }
    }

}
